<div class="left padL10 rt_type padT10">			
	<?php if ($type == 0): ?>
	<a class="current clr07 fs1" href="javascript:showresult('rt_list','reloadRtList','<?php echo $userId ?>','0','<?php echo $time ?>',1)">Tự tạo</a>
	<?php else:?>
	<a class="clr07 fs1" href="javascript:showresult('rt_list','reloadRtList','<?php echo $userId ?>','0','<?php echo $time ?>',1)">Tự tạo</a>
	<?php endif; ?>				
		|
	<?php if($type == 1): ?>
	<a class="current clr07 fs1" href="javascript:showresult('rt_list','reloadRtList','<?php echo $userId ?>','1','<?php echo $time ?>',1)">Đã dùng</a>
	<?php else: ?>
	<a class="clr07 fs1" href="javascript:showresult('rt_list','reloadRtList','<?php echo $userId ?>','1','<?php echo $time ?>',1)">Đã dùng</a>
	<?php endif; ?>
		|
    <?php if($type == 2): ?>
 	<a class="current clr07 fs1" href="javascript:showresult('rt_list','reloadRtList','<?php echo $userId ?>','2','<?php echo $time ?>',1)">Chờ duyệt</a>
 	<?php else: ?>
 	<a class="clr07 fs1" href="javascript:showresult('rt_list','reloadRtList','<?php echo $userId ?>','2','<?php echo $time ?>',1)">Chờ duyệt</a>
 	<?php endif; ?>           	
		|
	<?php if($type == 3): ?>
 	<a class="current clr07 fs1" href="javascript:showresult('rt_list','reloadRtList','<?php echo $userId ?>','3','<?php echo $time ?>',1)">Nhạc chuông ko duyệt</a>
 	<?php else: ?>
	<a class="clr07 fs1" href="javascript:showresult('rt_list','reloadRtList','<?php echo $userId ?>','3','<?php echo $time ?>',1)">Nhạc chuông ko duyệt</a>
 	<?php endif; ?>
 		|
 	<?php if($type == 4): ?>
 	<a class="current clr07 fs1" href="javascript:showresult('rt_list','reloadRtList','<?php echo $userId ?>','4','<?php echo $time ?>',1)">Nhạc ch ko duyệt</a>
 	<?php else: ?>
 	<a class="current clr07 fs1" href="javascript:showresult('rt_list','reloadRtList','<?php echo $userId ?>','4','<?php echo $time ?>',1)">Nhạc chờ ko duyệt</a>
 	<?php endif; ?>
</div>
<div id="list">
<?php #echo "<pre>";print_r($contents); ?>
<table class="user-infor" cellpadding="0">
	<tr>
		<th width="15">Ringtone_id</th>
		<th>Name</th>
                <th>Nghe</th>
                <th>Lượt Tải</th>
		<th>Category</th>
	</tr>
	<?php if(!is_array($contents) || count($contents)<1):?>
	<tr><td colspan="4" style="text-align: center;"> Không có kết quả nào</td></tr>
	<?php else: ?>
	<?php $i=0;foreach($contents as $content):?>
	<tr class="user-row<?php echo ($i%2)?>">
		<td><?php echo $content['ringtoneId']?></td>
		<td><?php echo $content['ringtoneName']?></td>
                <td>
			<object width="250" height="24" id="audioplayer1" data="<?php echo image_path('playa/player.swf');?>" type="application/x-shockwave-flash">
			<param value="player.swf" name="movie"/>
			<param value="playerID=1&amp;soundFile=<?php echo MEDIA_DOMAIN."/ringtone/realtone/".$content['filePath'];?>" name="FlashVars"/>
			<param value="high" name="quality"/>
			<param value="false" name="menu"/>
			<param value="transparent" name="wmode"/>
			</object>
		</td>
                <td><?php echo $content['totalDownload']?></td>
		<td><?php echo $content['categoryName']?></td>
	</tr>
	<!--<div class="clear" >
    	<div class="ringtone_content clear" >
    		<div class="ringtone_play">
    		</div>
			<div class="ringtone_des">
				<div class="rt_name">
					<a class="fs3 fwb" href="http://sangtao.imuzik.com.vn/ringtone/<?php echo iring::str_normalizer($content['ringtoneName'])?>/<?php echo $content['ringtoneId']?>" title = "<?php echo $content['ringtoneName'];?>"><?php echo iring::trim($content['ringtoneName'], 60);?></a>
				</div>
				<div class="fs2">
					<a href="http://sangtao.imuzik.com.vn/ringtone/<?php echo iring::str_normalizer($content['categoryName'])?>/<?php echo $content['categoryId']?>/0"><?php echo $content['categoryName'];?></a>
					<font class="rt_time">
						<?php #echo time_ago_vn($content['createdDatetime'],'1 phút trước')?>
						-
						<?php #echo $content['total_dl_set'].' lần tải'; ?>
					</font>
				</div>
			</div>
		</div>
	</div>
--><?php $i++;endforeach;?>
<?php endif ?>
</table>

</div>

<?php $url = "/user/reloadRtList?userId=$userId&type=$type&time=$time&page=%s";?>
<?php if ($totalPage > 1): ?>
<div class= "padT5 clearfix" align="right">
<?php
	echo mypaging::showPageAjax($totalPage,'reloadRtList',$page, 'rt_list', $userId, $type, $time);
?>
</div>
<?php endif; ?>
		
<script type="text/javascript">
function showresult(el,task,userId,type,time,page){
	$.ajax({		
		  url: '/user_detail/'+task+'/userId/'+userId+'/type/'+type+'/time/'+time+'/page/'+page,
		  success: function(data) {
		    $('#'+el).html(data);
		  }
		});
}
</script>
			
